#include "groupitem.h"
#include <QDebug>

GroupItem::GroupItem(QObject *parent) :
    QObject(parent)
{
}

GroupItem::GroupItem(int groupId, QString name, int groupIndex, int groupPriority){
    m_GroupId=groupId;
    m_Name=name;
    m_GroupIndex=groupIndex;
    m_GroupPriority=groupPriority;
}

GroupItem::~GroupItem(){
}

QString GroupItem::name(){
    return m_Name;
}

int GroupItem::groupId(){
    return m_GroupId;
}

int GroupItem::groupIndex()
{
    return m_GroupIndex;
}

int GroupItem::groupPriority()
{
    return m_GroupPriority;
}


void GroupItem::setName(QString name){
    qDebug()<<"promjena imena grupe na "<<name;
    if (QString::compare(m_Name, name, Qt::CaseSensitive) != 0){
        m_Name=name;
        emit dataChanged();
    }

}
